﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomInfo.aspx.cs" Inherits="CSM.Views.Kefu.CustomInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
<%--<script src="../../Js/jquery-1.1.3.1.pack.js" type="text/javascript"></script>--%>
<script src="../../Js/jquery-1.4.3.min.js" type="text/javascript"></script>
<script src="../../Js/jquery.autocomplete.min.js" type="text/javascript"></script> 
<link href="../../App_Themes/Default_1/jquery-datepicker.css" rel="stylesheet" type="text/css"/>
<script  type="text/javascript" src="../../Js/jquery-datepicker.js"></script> 
<link href="../../App_Themes/Default_1/jquery.autocomplete.css" type="text/css" rel="stylesheet"/> 
<script type="text/javascript" src="../../Js/thickbox.js"></script>
<link rel="stylesheet" href="../../App_Themes/Default_1/thickbox.css" type="text/css" media="screen" />
    <script language="javascript" type="text/javascript">
        //直接由数组获得 
        $(document).ready((function() {
            //由SERVER端获得
            $("#TextBox_BeginTime").datepicker();
            $("#TextBox_EndTime").datepicker();
            $("#txtOrder").autocomplete("../Management/GetData.ashx?database=TCrm_KF_Customer&which=CustomerID");
            $("#TextBox_Product").autocomplete("../Management/GetData.ashx?database=TCrm_KF_Product&which=ProductID");
        }
));
    function ShowThickBox(b, a) {
        var div = a;
        var title = b;
        imgLoader = new Image();
        imgLoader.src = tb_pathToImage;
        window.tb_show(title, "#TB_inline?height=300&width=400&inlineId=" + div, "");
    };
    
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:Panel ID="Panel_Gridlist" runat="server">
    <asp:Button ID="Button_Excel" runat="server" OnCommand="Button_Excel_Command" Text="批量增加" skinid="Button"/>
    <asp:Button ID="Button_Add" runat="server" OnCommand="Button_Add_Command" Text="增加" skinid="Button"/>
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" visible="false"/>
        <table>
        <tr><td>
           <asp:Label ID="Label_ShopId" runat="server" SkinID="Label" Text="店铺："></asp:Label></td>
            <td><asp:DropDownList ID="DropDownList_ShopId" runat="server"></asp:DropDownList></td>
            <td><asp:Label ID="Label12" runat="server" SkinID="Label" Text="客户ID："></asp:Label></td>
        <td><asp:TextBox ID="txtOrder" runat="server" SkinID="TextBox"></asp:TextBox></td>
        <td><asp:Label ID="Label13" runat="server" SkinID="Label" Text="省份："></asp:Label></td>
        <td><asp:DropDownList ID="DropDownList_Provinces" runat="server">
        </asp:DropDownList></td></tr>
        <tr><td><asp:DropDownList ID="DropDownList_Key" runat="server">
            <asp:ListItem Value="">选择关键词</asp:ListItem>
            <asp:ListItem Value="Ali">旺旺ID</asp:ListItem>
            <asp:ListItem Value="Order">订单编号</asp:ListItem>
            <asp:ListItem Value="Phone">电话</asp:ListItem>
            <asp:ListItem Value="Receiver">收货人姓名</asp:ListItem>
        </asp:DropDownList></td>
        <td><asp:TextBox ID="TextBox_Key" runat="server" SkinID="TextBox"></asp:TextBox></td>
        <td><asp:Label ID="Label20" runat="server" SkinID="Label" Text="产品ID："></asp:Label></td>
        <td><asp:TextBox ID="TextBox_Product" runat="server" SkinID="TextBox"></asp:TextBox></td></tr>
        <tr><td><asp:Label ID="Label18" runat="server" SkinID="Label" Text="金额区间："></asp:Label></td>
        <td><asp:TextBox ID="TextBox_Min" runat="server" SkinID="TextBox"></asp:TextBox></td>
        <td><asp:TextBox ID="TextBox_Max" runat="server" SkinID="TextBox"></asp:TextBox></td></tr>
        <tr>
                    <td><asp:Label ID="Label_BeginTime" runat="server" SkinID="Label" Text="时间区间："></asp:Label></td>
                    <td><asp:TextBox ID="TextBox_BeginTime" runat="server" SkinID="TextBox" 
                       ></asp:TextBox></td>
                    <td><asp:TextBox ID="TextBox_EndTime" runat="server" skinid="TextBox" ></asp:TextBox></td>
                    </tr></table>
        <asp:Button ID="Button_Browse" runat="server" OnClick="Button_Browse_Click" 
            SkinID="Button" Text="查询" />
        <asp:Panel ID="Panel_Browse" runat="server" Visible="False">
            <asp:LinkButton ID="LinkButton_First" runat="server" CommandArgument="First" 
                OnClick="MyClick"><img 
                                src = "../../App_Themes/Default_1/Images/Page_First.gif" class = "Page_First"
                                alt = "首页" /></asp:LinkButton>
            <asp:LinkButton ID="LinkButton_Prev" runat="server" CommandArgument="Prev" 
                OnClick="MyClick"><img  
                                src = "../../App_Themes/Default_1/Images/Page_Prev.gif" class = "Page_Prev"  
                                alt = "上页"/></asp:LinkButton>
            <asp:LinkButton ID="LinkButton_Next" runat="server" CommandArgument="Next" 
                OnClick="MyClick"><img  
                                src = "../../App_Themes/Default_1/Images/Page_Next.gif"  class = "Page_Next"  
                                alt = "下页"/></asp:LinkButton>
            <asp:LinkButton ID="LinkButton_Last" runat="server" CommandArgument="Last" 
                OnClick="MyClick"><img   
                                src = "../../App_Themes/Default_1/Images/Page_Last.gif" class = "Page_Last" 
                                alt = "末页"/></asp:LinkButton>
            <asp:Label ID="Label_Total" runat="server" SkinID="Label" Text="共："></asp:Label>
            <asp:Label ID="Label_CurrenPageAndTo" runat="server" SkinID="Label" 
                Text="页，当前第 页，转到"></asp:Label>
            <asp:TextBox ID="TextBox_PageIndex" runat="server" Width="26px"></asp:TextBox>
            <asp:Label ID="Label4" runat="server" SkinID="Label" Text="页"></asp:Label>
            <asp:RangeValidator ID="RangeValidator_PageIndex" runat="server" 
                ControlToValidate="TextBox_PageIndex" ErrorMessage="*" MaximumValue="10000" 
                MinimumValue="1" Type="Integer"></asp:RangeValidator>
            <asp:Button ID="Button_PageGo" runat="server" CommandArgument="GotoPage" 
                OnClick="MyClick" SkinID="Button" Text="GO" />
            <asp:GridView ID="GridView_Orders" runat="server" AutoGenerateColumns="False" 
                SkinID="gridview">
                <Columns>
                    <asp:BoundField DataField="TbID" HeaderText="淘宝ID" ReadOnly="True" 
                        SortExpression="淘宝ID" />
                    <asp:BoundField DataField="AllMoney" HeaderText="累计消费" ReadOnly="True" 
                        SortExpression="累计消费" />
                    <asp:BoundField DataField="CustomerName" HeaderText="客户名称" ReadOnly="True" 
                        SortExpression="客户名称" />
                    <asp:BoundField DataField="MobliePhone" HeaderText="电话号码" ReadOnly="True" 
                        SortExpression="电话号码" />
                    <asp:TemplateField HeaderText="地址">
                        <ItemTemplate>
                            <asp:Label ID="Lb" runat="server" 
                                Text='<%#GetSubString(Eval("Address").ToString())%>' 
                                ToolTip='<%#Eval("Address")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Button ID="Button_Change" runat="server" 
                                CommandArgument='<%# Eval("CustomerID") %>' oncommand="Button_Change_Command" 
                                SkinID="Button" Text="编辑" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </asp:Panel>
        <br>
        <br></br>
        <br>
        <br></br>
        <br></br>
        </br>
        </br>
        </asp:Panel>
                    <asp:HiddenField ID="CurrentPage" runat="server" Value="0" />
                    <asp:Panel ID="Panel_Edit" runat="server" visible="false">
                        <table style="width:100%;">
                            <tr>
                                <td>
                                    <asp:Label ID="Label5" runat="server" Text="客户ID：" SkinID="Label"></asp:Label>
                                </td>
                                <td class="style3">
                                    <asp:TextBox ID="TextBox_CustomerID" runat="server" SkinID="TextBox" ></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                            <td>
                            <asp:Label ID="Label14" runat="server" SkinID="Label" Text="店铺："></asp:Label></td>
                              <td><asp:DropDownList ID="DropDownList_Shops" runat="server"></asp:DropDownList></td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label6" runat="server" Text="淘宝ID：" SkinID="Label"></asp:Label>
                                </td>
                                <td class="style3">
                                    <asp:TextBox ID="TextBox_TbID" runat="server" SkinID="TextBox"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label1" runat="server" Text="客户名称：" SkinID="Label"></asp:Label>
                                </td>
                                <td class="style3">
                                    <asp:TextBox ID="TextBox_CustomerName" runat="server" SkinID="TextBox"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label2" runat="server" Text="省份：" SkinID="Label"></asp:Label>
                                </td>
                                <td class="style3">
                                    <asp:DropDownList ID="DropDownList_Province" runat="server">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label3" runat="server" Text="客户等级：" SkinID="Label"></asp:Label>
                                </td>
                                <td class="style3">
                                   <asp:DropDownList ID="DropDownList_CustomerLevel" runat="server">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label7" runat="server" Text="客户来源：" SkinID="Label"></asp:Label>
                                </td>
                                <td class="style3">
                                    <asp:TextBox ID="TextBox_Belongto" runat="server" SkinID="TextBox"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label15" runat="server" Text="手机：" SkinID="Label"></asp:Label>
                                </td>
                                <td class="style3">
                                    <asp:TextBox ID="TextBox_Phone" runat="server" SkinID="TextBox"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label9" runat="server" Text="地址：" SkinID="Label"></asp:Label>
                                </td>
                                <td class="style3">
                                    <asp:TextBox ID="TextBox_Address" runat="server" SkinID="TextBox"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label10" runat="server" Text="邮箱：" SkinID="Label"></asp:Label>
                                </td>
                                <td class="style3">
                                    <asp:TextBox ID="TextBox_Email" runat="server" SkinID="TextBox"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label11" runat="server" Text="回访等级：" SkinID="Label"></asp:Label>
                                </td>
                                <td class="style3">
                                    <asp:TextBox ID="TextBox_CallBackLevel" runat="server" SkinID="TextBox"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="Button_Save" runat="server"   skinid ="Button" 
                                        Text="保存"  UseSubmitBehavior="False" oncommand="Button_Save_Command" OnClientClick="tb_remove();"/>
                                    <asp:Button ID="Button_Cancel"  skinid ="Button" runat="server"
                                        Text="取消" oncommand="Button_Cancel_Command"  OnClientClick="window.tb_remove();"/>
                                </td>
                                <td class="style3">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </asp:Panel>
                    <asp:Panel ID="Panel_Excel" runat="server" visible="false">
                    <asp:Label ID="Label_ExcelInfo" runat="server" Text="选择Excel文件：" 
                        SkinID="LabelSkin"></asp:Label>
                    <asp:FileUpload ID="FileUpload1" runat="server" /><br />
                    <asp:Button ID="Button_UploadExcel" runat="server"   skinid ="Button" 
                                        Text="上传"  UseSubmitBehavior="False" oncommand="Button_UploadExcel_Command"/>
                                    <asp:Button ID="Button_ExitExcel"  skinid ="Button" runat="server"
                                        Text="取消" oncommand="Button_ExitExcel_Command" OnClientClick="window.tb_remove();"/>
                    </asp:Panel>
    </div>
    <asp:HiddenField ID="EditFlag" runat="server" Value="0" />
    <div id = "MyThickBox"></div>
    </form>
</body>
</html>
<% =alert %>